<template></template>

<script setup>
// 导入vue
import { inject, onMounted } from 'vue'
import useBuildings from './hooks/useBuildings'
import useRoads from './hooks/useRoads'
onMounted(async() => {
  // 通过inject, 获取地图场景对象
  const { scene, map } = inject('$scene_map')
  console.log(scene)
  // 创建城市建筑图层
  const building_layer = await useBuildings()
  // 在场景中添加城市建筑图层
  scene.addLayer(building_layer)

  // 创建城市道路图层
  const roads_layer = await useRoads()
  scene.addLayer(roads_layer)
})
</script>

<style></style>./hooks/useRoads
